package com.bear.newsset.widget.item;

import android.content.Context;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;
import android.widget.TextView;

import com.bear.newsset.R;

/**
 * 新闻Item - 无图
 */
public class NewsItemZeroImgView extends BaseNewsItemView {
    public static final int NEWS_ITEM_ZERO_IMG_VIEW_ID = 100000;
    private TextView tvTitle, tvPosterScreenName;

    public NewsItemZeroImgView(@NonNull Context context) {
        super(context);
    }

    public NewsItemZeroImgView(@NonNull Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public NewsItemZeroImgView(@NonNull Context context,
                               @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    public void init(Context mContext) {
        super.init(mContext);
        View v = createView( R.layout.item_news_0_img );
        tvTitle = v.findViewById(R.id.item_tv_title);
        tvPosterScreenName = v.findViewById(R.id.item_tv_poster_screen_name);

        setId( NEWS_ITEM_ZERO_IMG_VIEW_ID );
        addView( v );
    }

    public TextView getTitleView() {
        return tvTitle;
    }

    public TextView getPosterScreenNameView() {
        return tvPosterScreenName;
    }
}
